//
//  MoveOfficeViewController.m
//  PingShan
//
//  Created by jsmysoft on 16/10/18.
//  Copyright © 2016年 jsmysoft. All rights reserved.
//

#import "MoveOfficeViewController.h"
#import "MoveOfficeCell.h"

@interface MoveOfficeViewController ()<UITableViewDataSource, UITableViewDelegate>
//tableView
@property (strong, nonatomic) IBOutlet UITableView *tableView;
//会话沟通
@property (strong, nonatomic) IBOutlet UIButton *conversationBtn;
//短信群发
@property (strong, nonatomic) IBOutlet UIButton *TextMessageBtn;
//语音电话
@property (strong, nonatomic) IBOutlet UIButton *voicePhoneBtn;

@end

@implementation MoveOfficeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"移动办公";
    //设置tableView
    [self setUpTableView];
}
//设置tableView
- (void)setUpTableView {
    self.tableView.dataSource = self;
    self.tableView.delegate = self;
}
#pragma mark -- 数据源
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return 10;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    return [MoveOfficeCell moveOfficeCellWithTableView:tableView];
}
- (IBAction)headerBtnClick:(UIButton *)sender {
    if (sender.tag == 201) {
        self.conversationBtn.selected = true;
        self.TextMessageBtn.selected = false;
        self.voicePhoneBtn.selected = false;
        [self.conversationBtn setTitleColor:MainColor forState:UIControlStateSelected];
        [self.TextMessageBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        [self.voicePhoneBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        [self.tableView reloadData];
    } else if (sender.tag == 202) {
        self.conversationBtn.selected = false;
        self.TextMessageBtn.selected = true;
        self.voicePhoneBtn.selected = false;
        [self.TextMessageBtn setTitleColor:MainColor forState:UIControlStateSelected];
        [self.conversationBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        [self.voicePhoneBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        [self.tableView reloadData];
    } else if (sender.tag == 203) {
        self.conversationBtn.selected = false;
        self.TextMessageBtn.selected = false;
        self.voicePhoneBtn.selected = true;
        [self.voicePhoneBtn setTitleColor:MainColor forState:UIControlStateSelected];
        [self.conversationBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        [self.TextMessageBtn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
        [self.tableView reloadData];
    }
}

@end
